﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace MarioArena.World
{
    public struct Tile
    {
        public Texture2D Texture { get; private set; }
        public Rectangle Bounds { get; set; }
        public bool IsWall { get; private set; }

        public const int Width = 24;
        public const int Height = 24;

        public static readonly Vector2 Size = new Vector2(Width, Height);

        /// <summary>
        /// Constructs a new Tile
        /// </summary>
        /// <param name="texture">The texture to be displayed</param>
        /// <param name="rectangle">Bounding rectangle of this tile</param>
        public Tile(Texture2D texture, Rectangle rectangle) : this()
        {
            this.Texture = texture;
            this.Bounds = rectangle;
            this.IsWall = false;
        }

        /// <summary>
        /// Constructs a new Tile
        /// </summary>
        /// <param name="texture">The texture to be displayed</param>
        /// <param name="rectangle">Bounding rectangle of this tile</param>
        /// <param name="isWall">Whether this tile is a will or not.</param>
        public Tile(Texture2D texture, Rectangle rectangle, bool isWall)
            : this()
        {
            this.Texture = texture;
            this.Bounds = rectangle;
            this.IsWall = isWall;
        }
    }
}
